home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / pango-1.0 / pango / pangocairo.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-04-25  |  3.5 KB  |  104 lines

  1. /* Pango
  2.  * pangocairo.h:
  3.  *
  4.  * Copyright (C) 1999, 2004 Red Hat, Inc.
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Library General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  14.  * Library General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Library General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */
  21.  
  22. #ifndef __PANGOCAIRO_H__
  23. #define __PANGOCAIRO_H__
  24.  
  25. #include <pango/pango-context.h>
  26. #include <pango/pango-fontmap.h>
  27. #include <pango/pango-layout.h>
  28. #include <cairo.h>
  29.  
  30. G_BEGIN_DECLS
  31.  
  32. /**
  33.  * PangoCairoFontMap:
  34.  * 
  35.  * #PangoCairoFontMap is an interface exported by font maps for
  36.  * use with Cairo. The actual type of the font map will depend
  37.  * on the particular font technology Cairo was compiled to use.
  38.  *
  39.  * Since: 1.10
  40.  **/
  41. #define PANGO_TYPE_CAIRO_FONT_MAP       (pango_cairo_font_map_get_type ())
  42. #define PANGO_CAIRO_FONT_MAP(object)    (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_FONT_MAP, PangoCairoFontMap))
  43. #define PANGO_IS_CAIRO_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CAIRO_FONT_MAP))
  44.  
  45. typedef struct _PangoCairoFontMap      PangoCairoFontMap;
  46.  
  47. /*
  48.  * PangoCairoFontMap
  49.  */
  50. GType         pango_cairo_font_map_get_type    (void);
  51.  
  52. PangoFontMap *pango_cairo_font_map_new         (void);
  53. PangoFontMap *pango_cairo_font_map_get_default (void);
  54.  
  55. void          pango_cairo_font_map_set_resolution (PangoCairoFontMap *fontmap,
  56.                            double             dpi);
  57. double        pango_cairo_font_map_get_resolution (PangoCairoFontMap *fontmap);
  58. PangoContext *pango_cairo_font_map_create_context (PangoCairoFontMap *fontmap);
  59.  
  60. /* Update a Pango context for the current state of a cairo context
  61.  */
  62. void         pango_cairo_update_context (cairo_t      *cr,
  63.                      PangoContext *context);
  64.  
  65. void                        pango_cairo_context_set_font_options (PangoContext               *context,
  66.                                   const cairo_font_options_t *options);
  67. const cairo_font_options_t *pango_cairo_context_get_font_options (PangoContext               *context);
  68.  
  69. void               pango_cairo_context_set_resolution     (PangoContext       *context,
  70.                                double              dpi);
  71. double             pango_cairo_context_get_resolution     (PangoContext       *context);
  72.  
  73. /* Convenience
  74.  */
  75. PangoLayout *pango_cairo_create_layout (cairo_t     *cr);
  76. void         pango_cairo_update_layout (cairo_t     *cr,
  77.                     PangoLayout *layout);
  78.  
  79. /*
  80.  * Rendering
  81.  */
  82. void pango_cairo_show_glyph_string (cairo_t          *cr,
  83.                     PangoFont        *font,
  84.                     PangoGlyphString *glyphs);
  85. void pango_cairo_show_layout_line  (cairo_t          *cr,
  86.                     PangoLayoutLine  *line);
  87. void pango_cairo_show_layout       (cairo_t          *cr,
  88.                     PangoLayout      *layout);
  89.  
  90. /*
  91.  * Rendering to a path
  92.  */
  93. void pango_cairo_glyph_string_path (cairo_t          *cr,
  94.                     PangoFont        *font,
  95.                     PangoGlyphString *glyphs);
  96. void pango_cairo_layout_line_path  (cairo_t          *cr,
  97.                     PangoLayoutLine  *line);
  98. void pango_cairo_layout_path       (cairo_t          *cr,
  99.                     PangoLayout      *layout);
  100.  
  101. G_END_DECLS
  102.  
  103. #endif /* __PANGOCAIRO_H__ */
  104.